<?php
/**
 * Application level Controller
 *
 * This file is application-wide controller file. You can put all
 * application-wide controller-related methods here.
 *
 * PHP 5
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       Cake.Controller
 * @since         CakePHP(tm) v 0.2.9
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 */

App::uses('Controller', 'Controller');

/**
 * This is a placeholder class.
 * Create the same file in app/Controller/AppController.php
 *
 * Add your application-wide methods in the class below, your controllers
 * will inherit them.
 *
 * @package       Cake.Controller
 * @link http://book.cakephp.org/view/957/The-App-Controller
 */
class AppController extends Controller {
   	var $components = array('Acl', 'Session', 'Auth', 'Email', 'Cookie');
   	var $helpers = array('Html', 'Session', 'Form', 'Menu', 'Time', 'Number');
   	
   	function beforeFilter() {
   		// Configure AuthComponent
   		$this->Auth->loginError 	= ERROR_LOGIN;
		$this->Auth->authError 		= ERROR_PERMISSION;
        $this->Auth->loginAction 	= '/';
        $this->Auth->loginRedirect 	= array('admin' => true, 'controller' => 'projects', 'action' => 'list');
        $this->Auth->logoutRedirect = '/';
        $this->Auth->actionPath 	= 'controllers/';
    }
   	
}
?>